<div class="main-content clearfix" style="padding:15px;">
    <form id="newsform" name="newsform" class="form-horizontal-left form-horizontal" action="{BASESCRIPT}?mod=news&op=setting&do=basic" method="post" >
        <input type="hidden" name="settingsubmit" value="true" />
        <input type="hidden" name="formhash" value="{FORMHASH}" />
        <dl>
            <dt>{lang manager_setting}<small>（<b id="count_1">{eval echo count($moderators);}</b>）</small>:</dt>
            <dd class="clearfix">
                <ul id="users_1" class="list-unstyled clearfix" >
                       {eval $type=1;$users=$moderators}
                        <!--{template user_select_list}-->
                </ul>
            </dd>
        </dl>
              
        <dl>
            <dt>{lang message_setting}:</dt>
            <dd class="clearfix">
                <div class="radio-custom radio-primary ">
                    <input type="radio" name="settingnew[allownewnews]" value="0"<!--{if !$setting['allownewnews']}-->checked<!--{/if}--> onclick="jQuery('#allownewnewnews_users').hide()">
                    <label>{lang all_user}</label>
                </div>
            </dd>
            <dd class="clearfix">
                <div class="radio-custom radio-primary ">
                    <input type="radio"  name="settingnew[allownewnews]" value="1"<!--{if $setting['allownewnews']>0}-->checked<!--{/if}--> onclick="jQuery('#allownewnewnews_users').show();">
                    <label>{lang only_user}</label>
                </div>
            </dd>
        </dl> 
        
        <dl id="allownewnewnews_users" class="mt20" <!--{if $setting[allownewnews]==0}-->style="display:none"<!--{/if}-->>
            <dt>{lang allowed_to_publish_information}<small>（<b id="count_0">{eval echo count($posters);}</b>）</small>:</dt>
            <dd class="clearfix">
                <ul id="users_0" class="list-unstyled clearfix" >
                    {eval $type=0;$users=$posters}
                        <!--{template user_select_list}-->
                     
                </ul>
            </dd>
        </dl>
        
        <dl>
            <dt>{lang message_audit}:</dt>
            <dd class="clearfix">
                <div class="radio-custom radio-primary ">
                    <input type="radio" name="newsmod" value="0"<!--{if !$setting[newsmod]}-->checked<!--{/if}-->>
                    <label>{lang none_audit}</label>
                </div>
            </dd>
            <dd class="clearfix">
                <div class="radio-custom radio-primary ">
                    <input type="radio"  name="newsmod" value="1"<!--{if $setting[newsmod]=='1'}-->checked<!--{/if}-->>
                    <label>{lang need_audit}</label>
                </div>
            </dd> 
        </dl>
        <input class="btn btn-primary"  name="settingsubmit_btn" value="{lang save}" type="submit" style="background:#e11d2a">
    </form>
</div>
 
<script type="text/javascript">
jQuery('.left-drager').leftDrager_layout();
jQuery(document).ready(function(e) {
    jQuery(document).on('mouseenter','.user-item',function(){
		jQuery(this).addClass('hover');
	});
	jQuery(document).on('mouseleave','.user-item',function(){
		jQuery(this).removeClass('hover');
	}); 
});
 function seluser_1(ids,data) {
       var formdata={};
	   formdata.type=1;
	   formdata.formhash='{FORMHASH}';
	   formdata.selectsubmit=true;
	   formdata.uids=ids.join(',');
        var url = '{MOD_URL}&op=setting&operation=selectuser';
        jQuery.post(url, formdata, function (html) {
			jQuery("#users_1").html(html);
			jQuery("#count_1").html(ids.length ) ;
		});
    }
 function seluser_0(ids,data) {
       var formdata={};
	   formdata.type=0;
	   formdata.formhash='{FORMHASH}';
	   formdata.selectsubmit=true;
	   formdata.uids=ids.join(',');
        var url = '{MOD_URL}&op=setting&operation=selectuser';
        jQuery.post(url, formdata, function (html) {
			jQuery("#users_0").html(html);
			jQuery("#count_0").html(ids.length ) ;
		});
    }
function deleteUser(uid,type){
	jQuery.get('{MOD_URL}&op=setting&operation=deleteModerator',{'uid':uid,'type':type},function(html){
		
		jQuery('#users_'+type).html(html);
	});
} 
</script> 
